package Month5;

import java.util.Scanner;

public class A20250508LeecodeTest
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        System.out.print(findTheDifference(s1,s2));
    }
        public static char findTheDifference(String s, String t) {
            int count = 0;
            for (int i = 0; i < t.length(); i++) {
                count = 0;
                for (int j = 0; j < s.length(); j++) {
                    if (t.charAt(i) != s.charAt(j)) {
                        count++;
                    }
                    if (count == s.length())
                    {
                        return t.charAt(i);
                    }
                }
            }
            return '?';

        }

}
